.hexagon {
  background-color: skyblue;
  width: 100px;
  height: 50px;
  position: relative;
  top: 50px;
}

.hexagon:after {
  content: '';
  width: 0;
  height: 0;
  border-top: 35px solid skyblue;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  position: absolute;
  top: 50px;
}

.hexagon:before {
  content: '';
  width: 0;
  height: 0;
  border-bottom: 35px solid skyblue;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  position: absolute;
  top: -35px;
}
